Methods and systems for vehicle motion planning

ABSTRACT

Motion planning is described herein. Motion planning includes determining one or more trajectories and/or velocities. Trajectories and velocities are then provided to one or more controllers that cause a vehicle to travel to a location. By dynamically determining a motion path with various math equations, time may be saved by eliminating the need to choose between a plurality of motion plans.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims the benefit of U.S. Provisional Application No. 60/460,054, filed Feb. 16, 2017, the entirety of which is hereby incorporated by reference.

FIELD OF THE DISCLOSURE

This relates generally to automated driving and driving assistance systems, and more particularly, to motion planning.

BACKGROUND OF THE DISCLOSURE

Modern vehicles, especially automobiles, increasingly provide automated driving and driving assistance systems such as adaptive cruise control, automatic parking, and automatic navigation. Motion planning is often used to accomplish these tasks. Motion planning includes determining one or more trajectories and/or velocities. Trajectories and velocities are then provided to one or more controllers that cause a vehicle to travel to a location.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates an example diagram including a vehicle, an obstacle, and a goal, according to examples of the disclosure.

FIG. 2 illustrates an example diagram including a vehicle, an obstacle, and a goal, according to examples of the disclosure.

FIG. 3 illustrates an example process for motion planning, according to examples of the disclosure.

FIG. 4 illustrates an example diagram of a vehicle polygon, according to examples of the disclosure.

FIG. 5 illustrates an exemplary system block diagram of an autonomous vehicle system including automated driving software according to examples of the disclosure.

DETAILED DESCRIPTION

In the following description of examples, reference is made to the accompanying drawings which form a part hereof, and in which it is shown by way of illustration specific examples that can be practiced. It is to be understood that other examples can be used and structural changes can be made without departing from the scope of the disclosed examples.

Modern vehicles, especially automobiles, increasingly provide automated driving and driving assistance systems such as automatic parking and automatic navigation. To accomplish these tasks, motion planning methods typically determine a path for a vehicle. Motion planning methods often incorporate searching for a path to follow, avoiding obstacles and generating the best trajectory that ensures safety, comfort, and efficiency. As described herein, a motion planner (e.g., one or more systems capable of motion planning, which may include a sequence of poses, velocities, trajectories, or a combination thereof) can use information from a map (e.g., a Highly Automated Driving map (HAD map), also known as an HD map), sensors, a database, a knowledge graph, and/or a decision maker to generate a trajectory and/or velocity to be used by a vehicle to move the vehicle to a desired location. In some embodiments, a decision maker is a system that determines a target location/pose for a vehicle (e.g., a location/pose where an automated driving system intends to move a vehicle, such as a parking space, a position behind a vehicle directly in front of the autonomous vehicle, or a location provided by the user of a mobile application). Herein, a pose refers to a location and orientation of a vehicle. Further, herein, a trajectory may include a series of waypoints, a series of poses, one or more wheel angles, and/or other vehicle characteristics.

A motion planner, as described herein, can operate without the need for searching through a plurality of paths (e.g., via a tree traversal or other search algorithm). In embodiments described herein, the motion planner implicitly handles obstacles, without generating a plurality of trajectories and searching through them. For example, the motion planner may continually optimize trajectories and/or velocities to find one or more optimal trajectories and/or velocities. In some embodiments, convexifying the input provided by a sensors and/or a decision maker (e.g., setting up a problem based on obstacles, a target location, etc. and convexifying the problem so it may be solved by finding a maximum or minimum) may be performed by a motion planner. In some embodiments, the motion planner may output the optimal trajectory and/or velocity. In other words, after receiving a set of inputs, an optimization is ran by a motion planner, and the motion planner outputs a trajectory and/or velocity (as opposed to the motion planner choosing between a plurality of trajectories and/or velocities and outputting one or more of the trajectories and/or velocities). In some embodiments, the trajectory and/or velocity output by the motion planner may include a sequence of trajectory points (e.g., waypoints) for a pre-determined time horizon (e.g., an amount of time for which an autonomous vehicle, decision maker, and/or motion planner is using). In some embodiments, trajectory points may include easting, northing, and/or heading (e.g., as global coordinates), a desired velocity, a desired acceleration, and a desired curvature and/or steering angle.

In embodiments described herein, a motion planner receives input including right lane and left lane boundaries from a map and/or a perception system (e.g., sensors used for perceiving an environment around a vehicle (e.g., ultrasonic sensors, video, LiDAR, radar, etc.)). A motion planner may also receive input that includes obstacles (also referred to as obstacle polygons) from a perception system. In some embodiments, a motion planner may receive input associated with how an obstacle moves over time. Such input may be provided by a prediction engine, which can predict a location of a moving object at a particular time. Other inputs include a speed limit associated with the road a vehicle is on (which may be provided by a map), and a goal location (which may be provided by a decision maker).

Goals of a motion planner can include lane keeping, adaptive cruise control and stop and go, obstacle avoidance, and comfortable riding. In some embodiments, lane keeping includes a motion planner obtaining lane boundary information from the map and/or perception system and generating a trajectory and/or velocity to keep a vehicle in its lane. In some embodiments, adaptive cruise control and “stop and go” includes a motion planner providing a trajectory and/or velocity which can be used to cause a vehicle to maintain a speed while following a vehicle, cause a vehicle to maintain a speed limit, and/or cause a vehicle to come to a stop and/or begin moving (e.g., stop and go). In some embodiments, obstacle avoidance includes a motion planner receiving obstacles (e.g., obstacle polygons that represent vehicles, pedestrians, bicyclists) from a perception system and incorporating them into the motion planning (e.g., performed by the motion planner) to stop and/or maneuver around the obstacle based on a variety of factors including, but not limited to: the size of the obstacle, the movement of the obstacle, lane boundary information, etc. In addition, in some embodiments, comfortable riding refers to the generation of a trajectory and/or velocity that provides for increased passenger comfort when compared to alternative trajectories and/or velocities.

Some of the contributions of the motion planner are the formulation and convexification of a vehicle motion planning and obstacle avoidance problem as an optimization problem that is then simplified/convexified in such a way that the problem can be solved tractably and in real time by existing methods. This formulation includes obstacles that can vary in size and shape over time, a vehicle model that ensures feasibility of trajectories, and an objective function that ensures comfort, and efficient satisfaction of a goal.

FIG. 1 illustrates an example diagram 100A including a vehicle 100, an obstacle 110 (also referred to as an obstacle polygon), and a goal 120 (also referred to as a target, a target goal, a location, a target location, etc.), according to examples of the disclosure. FIG. 1 also includes a left lane boundary 102 and a right lane boundary 104 (also referred to as a left lane boundary polygon and a right lane boundary polygon, respectively). In addition, FIG. 1 illustrates an example obstacle 110 where time (t)=0.

FIG. 2 illustrates an example diagram 100B including a vehicle 100, an obstacle 110 (also referred to as an obstacle polygon), and a goal 120 (also referred to as a target, a target goal, a location, a target location, etc.), according to examples of the disclosure. FIG. 2 also includes a left lane boundary 102 and a right lane boundary 104 (also referred to as a left lane boundary polygon and a right lane boundary polygon, respectively). In addition, FIG. 2 illustrates an example obstacle 110 where time (t)=horizon_length. In various embodiments, horizon_length refers to an amount of time that a decision maker or a motion planner plans ahead.

Sequential Quadratic Programming

Broadly, motion planning can be posed as an optimization problem. This involves optimizing over the trajectory and/or velocity plans in such a way to minimize a cost function and satisfy constraints. The cost function may include terms such as numerical representations of comfort (e.g. acceleration or jerk magnitude), and terms that are numerical representations of satisfaction of goals, such as distance to a goal pose. The constraints of an optimization problem applied to motion planning may include physical constraints such as maximum feasible or allowable acceleration, how a vehicle might move between poses, or ensuring a minimum distance from obstacles is maintained.

A general optimization problem with m inequality constraints and n equality constraints has the following form:

$\begin{matrix} \begin{matrix} {\mspace{65mu} \min\limits_{\theta}} & {\; {f(\theta)}} & \; & \; \\ {{subject}\mspace{14mu} {to}} & {g_{i}(\theta)} & {\leq 0} & {i = {1\mspace{14mu} \cdots \mspace{14mu} m}} \\ \; & {h_{j}(\theta)} & {= 0} & {j = {1\mspace{14mu} \cdots \mspace{14mu} n}} \end{matrix} & \left( {{Equation}\mspace{14mu} 1} \right) \end{matrix}$

with optimization vector θ∈

^(N).

In this most general form, there are no constraints on the form of the optimization objective, nor on any of the constraints (e.g., these functions need not be affine nor quadratic nor convex).

In various embodiments, the goal of Sequential Quadratic Programming (SQP) is to locally approximate a (nonconvex or nonlinear) optimization problem as a tractable Quadratic Program (QP) and repeatedly solve to get ‘steps’ in θ-space towards a locally optimal solution.

The pseudo-code for solving an optimization problem using SQP can then become:

$\begin{matrix} {{Set}\mspace{14mu} {initial}\mspace{14mu} {guess}\mspace{14mu} \theta_{0}} & \left( {{Equation}\mspace{14mu} 2} \right) \\ {{{{Repeat}\mspace{14mu} {until}\mspace{14mu} {{\theta - \theta_{0}}}} > \epsilon}{{Solve}\text{:}}} & \left( {{Equation}\mspace{14mu} 3} \right) \\ \begin{matrix} {\mspace{76mu} \min\limits_{\theta}} & {{{\nabla{f\left( \theta_{0} \right)}}\left( {\theta - \theta_{0}} \right)} + {\frac{1}{2}\left( {\theta - \theta_{0}} \right)^{T}{H(f)}\left( \theta_{0} \right)\left( {\theta - \theta_{0}} \right)}} & \; & \; \\ {{Subject}\mspace{14mu} {To}} & {{g_{i}\left( \theta_{0} \right)} + {{\nabla{g_{i}\left( \theta_{0} \right)}^{T}}\left( {\theta - \theta_{0}} \right)}} & {\leq 0} & {i = {1\mspace{14mu} \ldots \mspace{14mu} m}} \\ \; & {{h_{j}\left( \theta_{0} \right)} + {{\nabla{h_{j}\left( \theta_{0} \right)}^{T}}\left( {\theta - \theta_{0}} \right)}} & {= 0} & {j = {1\mspace{14mu} \ldots \mspace{14mu} n}} \end{matrix} & \left( {{Equation}\mspace{14mu} 4} \right) \\ \left. \theta_{0}\leftarrow\theta \right. & \left( {{Equation}\mspace{14mu} 5} \right) \end{matrix}$

where the objective function now becomes the second-order approximation of the objective function about a point θ₀, and the constraints become a ne (linear+bias) approximations also about point θ₀.

In some embodiments, a constraint is added to the size of the update (e.g., L_(∞) norm), and a line search can be performed after each solve iteration on the update size parameter to determine if the true objective function is actually improving (and if not, in some embodiments, the size step constraints may be increased).

Another extension of the SQP paradigm can include Sl1QP, that is sequential quadratic programming with l1 penalties in the place of nonlinear constraints. Concretely, the convex subproblem looks like:

$\begin{matrix} \begin{matrix} {\mspace{70mu} \min\limits_{\theta,v,w,t}} & {{{\nabla{f\left( \theta_{0} \right)}}\left( {\theta - \theta_{0}} \right)} + {\frac{1}{2}\left( {\theta - \theta_{0}} \right)^{T}{\nabla_{\theta\theta}^{2}{\mathcal{L}\left( \theta_{0} \right)}}\left( {\theta - \theta_{0}} \right)} +} & \; & \; & \; \\ \; & {{\mu {\sum\limits_{i = 1}^{m}\; t_{i}}} + {\mu {\sum\limits_{j = 1}^{n}\; \left( {v_{j} + w_{j}} \right)}}} & \; & \; & \; \\ {{Subject}\mspace{14mu} {To}} & {{g_{i}\left( \theta_{0} \right)} + {{\nabla{g_{i}\left( \theta_{0} \right)}^{T}}\left( {\theta - \theta_{0}} \right)}} & \geq & {- t_{i}} & {i = {1\mspace{14mu} \ldots \mspace{14mu} m}} \\ \; & {{h_{j}\left( \theta_{0} \right)} + {{\nabla{h_{j}\left( \theta_{0} \right)}^{T}}\left( {\theta - \theta_{0}} \right)}} & = & {v_{j} - w_{j}} & {j = {1\mspace{14mu} \ldots \mspace{14mu} n}} \\ \; & {v,w,t} & \geq & 0 & \; \\ \; & {{\theta - \theta_{0}}} &  & s & \; \end{matrix} & \left( {{Equation}\mspace{14mu} 6} \right) \end{matrix}$

where μ a is the penalty weight, s is the parameter controlling size of the trust region, v, w and t are slack variables and

is the lagrangian:

=f(θ)−{right arrow over (λ)}^(T) {right arrow over (g)}(θ)−{right arrow over (v)} ^(T) {right arrow over (h)}(θ)  (Equation 7)

As μ increases in magnitude, the constraints will necessarily be satisfied, similar to the steps used in the interior point method. Specifically, this method modifies the objective function to become the following:

$\begin{matrix} {{\overset{\sim}{f}(\theta)} = {{f(\theta)} + {\sum\limits_{i = 1}^{n}\; {\max \left( {{- {g_{i}(\theta)}},0} \right)}} + {\mu {\sum\limits_{j = 1}^{m}\; {{h_{j}(\theta)}}}}}} & \left( {{Equation}\mspace{14mu} 8} \right) \end{matrix}$

And the prior form of the optimization function is simply a modification to handle the nonlinear forms of the absolute value and max functions.

TrajOpt (Also Known as Trajectory Optimization)

In various embodiments, the TrajOpt algorithm, which can be generated by the motion planner, can be thought of as motion planning formulated as a Sl1QP using obstacle/contact constraints.

Key to the TrajOpt algorithm is the notion of signed distances, a variant on minimum translation distance. The signed distance is negative when objects intersect (the vector and magnitude being the distance between the closest points). This value can be positive when objects are not touching. Signed distance between two convex polygon objects, P and Q is denoted sd(P(θ), Q), where we typically let P(θ) be the robot (vehicle's) polygon (e.g., a polygon representing a vehicle) given a solution and Q be the obstacle polygon.

Calculating the signed distance is a nonlinear operation, and thus can be linearized in the following form:

sd(P(θ),Q)≈sd(P(θ₀),Q)+{circumflex over (n)} ^(T) J _(p)(θ₀)(θ−θ₀))  (Equation 9)

where {circumflex over (n)} is the normal of the minimum translation distance (from the car polygon, P to the obstacle polygon, Q), and J_(p) is the robot jabobian with respect to point p on the car polygon, P.

Recall that given a mapping from configuration space to physical space,

(θ)

χ, then the robot jacobian is then defined as:

$\begin{matrix} {{J_{p}(\theta)} = \left\lbrack \frac{\partial f_{i}}{\partial\theta_{j}} \right\rbrack} & \left( {{Equation}\mspace{14mu} 10} \right) \end{matrix}$

The main loop of the algorithm is described in FIG. 3.

FIG. 3 illustrates an example process for motion planning, according to examples of the disclosure.

At step 310, the initial guess is θ.

-   -   This initial guess may be created as a concatenated vector of         the vehicle's current pose—that is an initial trajectory         assuming the vehicle remains still     -   The initial guess may also be the last valid trajectory the         solver has generated, modified in such a way to be consistent         with the vehicle's current pose and goals

At step 320, a convex approximation of a problem with a guess of θ is created.

-   -   Nonlinear constraints can be turned into L1 penalties in the         objective function.     -   Slack variables for the nonlinear constraints are also         introduced (2 for each equality constraint, 1 for each         inequality constraint).     -   The change from the current guess is bounded to be at most s.

At step 330, the convex approximation is solved (e.g., process 500 of FIG. 5).

At step 340, a determination is made as to whether the true objective function improves enough with regard to the convex approximation. If true, the trust region variables are updated appropriately.

-   -   If the improvement is good enough, accept update to θ←θ+d, and         expand the trust region: s←τ+S. Proceed to step 350.     -   Otherwise, return to step 330 with a smaller trust region s←τ−s         (line search).

At step 350, the L1 penalty factors are increased, and the process returns to step 320. In some embodiments, the process may stop at a predetermined timeout.

In some embodiments, if the convex subproblem is solved satisfactorily, the L1 penalty factors are increased: μ←k μ, and the method returns to step 320 until it timeout or all constraints are satisfied within a threshold (e.g., within some ∈ tolerance).

Waypoint Following Motion Planning

As described herein, a motion planner is capable of following waypoints (e.g., traveling to locations/points which may include a target goal). In some embodiments, the waypoint following provided by a motion planner can be defined as a trajectory optimization problem. Such a formulation of the goal in these embodiments allows for a generic interface to the motion planner from other systems, which may include user interfaces or higher level decision making software.

First, in various embodiments, the state variables are defined to be:

$\begin{matrix} {x = \left\lbrack {E,N,\psi,u_{x},a_{x},\delta_{rw}} \right\rbrack^{T}} & \left( {{Equation}\mspace{14mu} 11} \right) \\ {u = \left\lbrack {j_{x},{\overset{.}{\delta}}_{rw}} \right\rbrack^{T}} & \left( {{Equation}\mspace{14mu} 12} \right) \end{matrix}$

Specifically, these state variables are position of the center of gravity, heading of the vehicle, longitudinal velocity and acceleration, road wheel angle, longitudinal jerk, and the time derivative of the road wheel angle.

We can let the full state (at a given time step) be defined as z=[x, u]. Note that the following are equivalent: N≡y_(c), E≡x_(c), and that the equations of motion assume that heading, ψ, is CCW positive with North (the positive y-axis) as 0.

Given a time horizon, T (such that t∈[0,T]), discretized in some way such that t_(l)=Σ_(τ=0) ^(l)Δt_(τ)=T. Here, l∈{1, . . . , L} can be thought of as the index of the state variables for a given time step.

The full optimization vector can now be defined as follows:

θ=[z ₁ . . . z _(L)]T∈

^(8·L)  (Equation 13)

In some embodiments, the following constraints may also be introduced:

-   -   Initial conditions: z₁=z_(init)     -   Bounds constraints: z_(lb)         z₁         z_(ub)∀l∈{1,L}     -   Obstacle constraints:         sd(P(z_(l)),Q_(k,l))>d_(safe,k)l∈{1,L},∀k∈K_(l)     -   Dynamic (equality constraints): x_(l+1)=f(x_(l),u_(l))∀l∈{1,L}

Obstacle Constraints

FIG. 4 illustrates an example diagram 400 of a vehicle polygon 410, according to examples of the disclosure. We seek for the vehicle to not collide with any obstacles for each time step. Modeling collisions as violating inequality constraints allows obstacle avoidance to be incorporated into the motion planning optimization problem. We now introduce the following notation:

Let Q_(k,l)k∈{1, . . . , K} refer to a convex obstacle polygon (with points q∈Q_(k,l)), whose position and orientation is predicted at some timestep l. We then require the AV polygon to have some minimum safety distance from each polygon at each timestep l.

For generality, we assume each polygon, Q_(k) is given some category (e.g., car, truck, pedestrian, bicycle, etc.). We also assume that each polygon category has some safety distance unique to it. For example, the safety distance for pedestrians might be greater than that of bicycles, and bicycles greater than trucks, which is greater than cars.

Similarly P(z_(l)) refers to the bounding box of the vehicle at some timestep l, including some velocity-dependent safety headway added in to the front of the polygon. For concreteness, the vehicle polygon is parameterized by x_(l), y_(l), ψ_(l), and u_(x,l).

Vehicle Model

A vehicle model can be used in order to provide an approximation of how a vehicle might move. In various embodiments, incorporating such a model into the optimization problem ensures dynamic feasibility, meaning that a trajectory and/or velocity plan generated by the optimization problem will be physically possible to drive.

These values are not explicitly encoded as constraints, but rather are used in the objective function. These values come from the steady state turning assumption.

$\begin{matrix} {a_{y} = \frac{\delta_{rw}}{\frac{L}{u_{x}^{2}} + \frac{K}{g}}} & \left( {{Equation}\mspace{14mu} 14} \right) \\ {\overset{.}{\psi} = \frac{\delta_{rw}}{\frac{L}{u_{x}} + \frac{{Ku}_{x}}{g}}} & \left( {{Equation}\mspace{14mu} 15} \right) \\ {u_{y} = {{{- \frac{W_{r}}{{gC}_{ar}}}a_{y}u_{x}} + {b\; \overset{.}{\psi}}}} & \left( {{Equation}\mspace{14mu} 16} \right) \\ {\overset{.}{x} = {{{- u_{x}}\mspace{14mu} {\sin (\psi)}} - {u_{y}\mspace{14mu} {\cos (\psi)}}}} & \left( {{Equation}\mspace{14mu} 17} \right) \\ {\overset{.}{y} = {{u_{x}\mspace{14mu} {\cos (\psi)}} - {u_{y}\mspace{14mu} {\sin (\psi)}}}} & \left( {{Equation}\mspace{14mu} 18} \right) \end{matrix}$

where L is the wheelbase length, K is the steering gradient, C_(ar) is the rear tire cornering stiffness, W_(r) is the rear weight distribution, and b is the distance from the center of gravity to the rear axle. Each of these values is car specific, and time invariant, and thus should simply be constant numbers in the final problem.

Dynamic Equality Constraints

The above stated vehicle model can be applied to update equations, which more concretely describe which pose a vehicle might move to from one pose and some set of inputs. Using the vehicle model equations described in the above section, dynamic feasibility of outputted trajectories can be ensured.

Broadly, we apply a numerical integration scheme to obtain dynamic constraints. Some direct derivative chains are only time varying, and thus the numerical integration method only results dynamic constraints similar to the taylor expansion form:

$\begin{matrix} {u_{x,{l + 1}} = {u_{x,l} + {a_{x,l}\Delta \; t_{l}} + {j_{x,l}\frac{\Delta \; t_{l}}{2}}}} & \left( {{Equation}\mspace{14mu} 19} \right) \\ {a_{x,{l + 1}} = {a_{x,l} + {j_{x,l}\Delta \; t_{l}}}} & \left( {{Equation}\mspace{14mu} 20} \right) \\ {\delta_{{rw},{l + 1}} = {\delta_{{rw},l} + {{\overset{.}{\delta}}_{{rw},l}\Delta \; t_{l}}}} & \left( {{Equation}\mspace{14mu} 21} \right) \end{matrix}$

While these dynamic constraints are linear, the rest of the constraints can be nonlinear functions of these:

ψ(t)=f(u _(x)(t),δ_(rw)(t))  (Equation 22)

a _(y)(t)=f(δ_(rw)(t),u _(x)(t))  (Equation 23)

u _(y)(t)=f(a _(y)(t),u _(x)(t),ψ(t))  (Equation 24)

{dot over (x)}(t)=f(u _(x)(t),u _(y)(t),ψ(t))  (Equation 25)

{dot over (y)}(t)=f(u _(x)(t),u _(y)(t),ψ(t))  (Equation 26)

The above defined derivatives can then enable the forward estimates of the following optimization variables using a numerical integration scheme, one such example of which will be described in the next section.

ψ(t)=f(ψ(t))  (Equation 27)

x(t)=f({dot over (x)}(t))  (Equation 28)

y(t)=f({dot over (y)}(t))  (Equation 29)

Computing the Dynamic Constraints

In some embodiments, first order midpoint updates to compute the linearized equality constraints may be used. In some embodiments, the following true equalities may be obtained:

$\begin{matrix} {{{\psi \left( t_{l + 1} \right)} - {\psi \left( t_{l} \right)}} = \frac{\Delta \; t_{l}{\overset{\sim}{\delta}}_{{rw},l}}{\frac{K}{g} + \frac{L}{{\overset{\sim}{u}}_{x,l}}}} & \left( {{Equation}\mspace{14mu} 30} \right) \\ {{{x\left( t_{l + 1} \right)} - {x\left( t_{l} \right)}} = {{- \Delta}\; {t_{l}\left( {{{\overset{\sim}{u}}_{x,l}\mspace{14mu} {\sin \left( {\overset{\sim}{\psi}}_{l} \right)}} + {{\overset{\sim}{u}}_{y,l}\mspace{14mu} {\cos \left( {\overset{\sim}{\psi}}_{l} \right)}}} \right)}}} & \left( {{Equation}\mspace{14mu} 31} \right) \\ {{{{y\left( t_{l + 1} \right)} - {y\left( t_{l} \right)}} = {{\Delta \; t_{l}{\overset{\sim}{u}}_{x,l}\mspace{14mu} {\cos \left( {\overset{\sim}{\psi}}_{l} \right)}} - {\Delta \; t_{l}{\overset{\sim}{u}}_{y,l}\mspace{14mu} {\sin \left( \overset{\sim}{\psi} \right)}}}}{where}} & \left( {{Equation}\mspace{14mu} 32} \right) \\ {{\overset{\sim}{u}}_{x,l} = {{\frac{1}{2}a_{x_{l}}\Delta \; t_{l}} + {\frac{1}{8}j_{x,l}\Delta \; t_{l}^{2}} + u_{x,l}}} & \left( {{Equation}\mspace{14mu} 33} \right) \\ {{\overset{\sim}{\delta}}_{{rw},l} = {\delta_{{rw},l} + {\frac{1}{2}\Delta \; t_{l}{\overset{.}{\delta}}_{{rw},l}}}} & \left( {{Equation}\mspace{14mu} 34} \right) \\ {{\overset{\sim}{u}}_{y,l} = {\frac{b\; {\overset{\sim}{\delta}}_{{rw},l}}{\frac{K}{g} + \frac{L}{{\overset{\sim}{u}}_{x,l}}} - \frac{{\overset{\sim}{\delta}}_{{rw},l}{\overset{\sim}{u}}_{x,l}W_{r}}{C_{ar}{g\left( {\frac{K}{g} + \frac{L}{{\overset{\sim}{u}}_{x,l}^{2}}} \right)}}}} & \left( {{Equation}\mspace{14mu} 35} \right) \end{matrix}$

These constraints can be linearized to become consistent with the Sl1QP problem formulation in a later section.

Objective Function

A numerical representation of the goodness of a trajectory is required to make comparisons and thus optimize such a trajectory. This representation can be referred to as an objective function, which may include terms relating to comfort and satisfaction of some goal or goals.

In some embodiments, the objective function may be defined for the optimization problem. Assuming a target goal and a heading of:

W=(N _(w) ,E _(w),ψ_(w))  (Equation 36)

where w refers to waypoint.

In some embodiments, the objective function can be defined as:

$\begin{matrix} {{F(\theta)} = {{\sum\limits_{l = 1}^{L - 1}\; {\frac{1}{2}\left( {{\gamma_{j_{z}}\left( j_{x,l} \right)}^{2} + {\gamma_{a_{x}}\left( a_{x,l} \right)}^{2} + {\gamma_{a_{y}}\left( a_{y,l} \right)}^{2} + {\gamma_{\delta}\left( \delta_{{rw},l} \right)}^{2} + {\gamma_{\delta}\left( {\overset{.}{\delta}}_{{rw},l} \right)}^{2} + {\gamma_{u_{x}}{U\left( {u_{x,l},u_{x,\lim}} \right)}}} \right)}} + {\gamma_{w,p}\left( {N_{L} - N_{w}} \right)}^{2} + {\gamma_{q,p}\left( {E_{L} - E_{w}} \right)}^{2} + {\gamma_{w,h}{atan}\; 2\left( {{\sin \left( {\psi_{w} - \psi_{L}} \right)},{\cos \left( {\psi_{w} - \psi_{L}} \right)}} \right)^{2}}}} & \left( {{Equation}\mspace{14mu} 37} \right) \end{matrix}$

where U(u,v) is defined as follows:

$\begin{matrix} {{U\left( {u,v} \right)} = \left\{ \begin{matrix} {\gamma_{u_{+}}\left( {u - v} \right)}^{2} & {u \geq v} \\ {{\gamma_{u_{-}}\left( {v - u} \right)}\mspace{11mu}} & {u < v} \end{matrix} \right.} & \left( {{Equation}\mspace{14mu} 38} \right) \end{matrix}$

which is shaped as such to penalize too much velocity (going to fast) more than too little velocity (going to slow).

The a tan 2 expression is used to generate a smooth, differentiable measure of angle difference (e.g., it is used to find |ψ_(w)−ψ_(L)|² without the need to use min, max, and/or modulo.

Trajectory Optimization Problem Formulation for Vehicle Motion Planning

Below, example jacobians and hessians are defined and used for the convex approximation of an obstacle aware motion planning problem. Solving a motion planning problem is highly nonconvex, and thus very difficult to solve directly. In embodiments of motion planners that directly take into account obstacle information in a closed form, the motion planning problem is even more difficult to solve. A convex optimization problem can be solved more easily. The below example jacobians and Hessians defined provide a template for obstacle aware motion planning to be transformed from a very difficult nonconvex problem into a sequence of easily solved convex problems, the process of which is described generally herein.

Obstacle Constraints

Solving a combined motion planning and obstacle avoidance problem requires an analytical representation of hitting obstacles or not. Some analytical representations of such can involve polygons (or other shapes such as ellipsoids) representing the vehicle that may change in size, shape, or position over time. The equations for one such example of a polygon representing a vehicle that varies in size is described below. This example of a variable vehicle polygon uses the notion of a time headway to ensure safety and emulate human driving behavior.

Assuming the normal {circumflex over (n)}, and the contact points p, and q are given, we now obtain the expression for the robot (e.g., vehicle) jacobian given a contact point.

Notation described herein can be as follows: assuming there is some fixed reference point for the vehicle polygon (e.g., the vehicle represented as a polygon), P, denoted p_(c)=(x_(c),y_(c)). Note that this point can also be the (E, N) that may be backed out at each timestep of the solution of the QP, z_(l)∈θ.

The contact point on the surface of P, may also be defined, denoted as p=(x_(p),y_(p)).

To fully define an arbitrary point on the surface of the vehicle polygon for any heading, the following “robot/vehicle motion” equations may be used:

x _(p) =f ₁(z _(l))=x _(c) −r _(p)(θ_(p) ,u _(x,l))sin(ψ+θ_(p))  (Equation 39)

y _(p) =f ₂(z _(l))=y _(c) −r _(p)(θ_(p) ,u _(x,l))cos(ψ+θ_(p))  (Equation 40)

where (r_(p),θ_(p)) fully defines any point on the surface of the vehicle polygon and r_(p) is a function of θ_(p) and u_(x,l) because the front of the vehicle polygon expands due to time headway. Additionally, in some embodiments, the following points (in the θ sense) may be defined as follows:

-   -   θ₁: The front left-most corner of the nominal vehicle polygon         430.     -   θ₂: The front right-most corner of the nominal vehicle polygon         432.     -   θ_(s): The left-most corner of the headway expanded vehicle         polygon 434.     -   θ_(s′): The right-most corner of the headway expanded vehicle         polygon 436.

In some embodiments, if θ_(p) as shown in diagram 400 is in the region where the vehicle polygon varies due to time headway, the expression may be:

$\begin{matrix} {{r\left( {\theta_{p},u_{x}} \right)} = \left\{ \begin{matrix} \sqrt{\left( {{w\left( \theta_{p} \right)}^{2} + \left( {L + {u_{x}\Delta \; t_{h}}} \right)^{2}} \right.} & {{\theta_{p} \in \left( {\theta_{s},\theta_{s^{\prime}}} \right)}\mspace{110mu}} \\ {\sqrt{w^{2} + \left( {L + {L^{\prime}\left( \theta_{p} \right)}} \right)^{2}}\mspace{40mu}} & {\theta_{p} \in {\left( {\theta_{1},\theta_{s}} \right)\bigcup\left( {\theta_{s^{\prime}},\theta_{2}} \right)}} \end{matrix} \right.} & \left( {{Equation}\mspace{14mu} 41} \right) \\ {\mspace{76mu} {{L^{\prime}\left( \theta_{p} \right)} = {\left( {w - {w\left( \theta_{p} \right)}} \right)\mspace{14mu} {\tan \left( {{atan}\; 2\left( {L,{w\left( \theta_{p} \right)}} \right)} \right)}}}} & \left( {{Equation}\mspace{14mu} 42} \right) \end{matrix}$

where the first case corresponds to a point on the front surface, and the second case corresponds to points on the lateral surfaces.

The robot/vehicle jacobian may now be:

$\begin{matrix} {J_{p} = {\quad{\begin{bmatrix} 1 & 0 & {{- {r_{p}\left( {\theta_{p},v_{l}} \right)}}\mspace{14mu} {\cos \left( {\psi + \theta_{p}} \right)}} & {{- {\sin \left( {\psi + \theta_{p}} \right)}}\frac{\partial r}{\partial u_{x}}} & \cdots \\ 0 & 1 & {{- {r_{p}\left( {\theta_{p},v_{l}} \right)}}\mspace{14mu} {\sin \left( {\psi + \theta_{p}} \right)}} & {{\cos \left( {\psi + \theta_{p}} \right)}\frac{\partial r}{\partial u_{x}}} & \cdots \end{bmatrix}\mspace{76mu} {where}}}} & \left( {{Equation}\mspace{14mu} 43} \right) \\ {\mspace{76mu} {\frac{\partial r}{\partial u_{x}} = \left\{ \begin{matrix} \frac{\Delta \; {t_{h}\left( {L + {u_{x}{\Delta t}_{h}}} \right)}}{r\left( {\theta_{p},u_{x}} \right)} & {\theta_{p} \in \left( {\theta_{s},\theta_{s^{\prime}}} \right)} \\ {0\mspace{149mu}} & {{else}\mspace{95mu}} \end{matrix} \right.}} & \left( {{Equation}\mspace{14mu} 44} \right) \end{matrix}$

In some embodiments, the output of the signed distance geometry functions typically give (x_(p),y_(p)) agnostic to the base orientation of the vehicle polygon 410, by transforming the robot/vehicle motion equations, the following simplification may instead be used:

$\begin{matrix} {{{\hat{n}}_{k,l}^{T}{J_{p,k}\left( z_{l} \right)}} = {{\hat{n}}_{k,l}^{T}{\quad\begin{bmatrix} 1 & 0 & {{- y_{p,k,l}} + y_{c,l}} & {{- {\sin \left( {\psi_{l} + \theta_{p,k,l}} \right)}}\frac{\partial r}{\partial u_{x,l}}\left( \theta_{p,k,l} \right)} & \cdots \\ 0 & 1 & {x_{p,k,l} - x_{c,l}} & {{\cos \left( {\psi_{l} + \theta_{p,k,l}} \right)}\frac{\partial r}{\partial u_{x,l}}\left( \theta_{p,k,l} \right)} & \cdots \end{bmatrix}}}} & \left( {{Equation}\mspace{14mu} 45} \right) \end{matrix}$

where k∈K_(l) is one of the objects at timestep l close enough to the vehicle polygon 410 to warrant a distance check (set K_(l)), and {circumflex over (n)}_(k,l) can be the associated normal between the vehicle polygon 410 and the object at that same timestep.

The above can be extended to be over timesteps (e.g., continuous time collision detection). Modifications may include using J_(p,k)(z_(l),z_(l+1)) instead of the jacobian, the normal can be calculated with respect to the swept volume, and the jacobian for each involved timestep can receive a scaled amount of the jacobian above.

Objective Jacobian

Convex approximations of generic nonlinear optimization problem require the Jacobian of an objective function to be computed and defined. This section derives the jacobian of the example objective function described above.

The jacobian may have terms relating to the objective function and the distance constraints:

$\begin{matrix} {{J_{l} = {{\begin{bmatrix} 0 \\ 0 \\ 0 \\ {{\overset{.}{U}}_{x}\left( z_{l} \right)} \\ {\gamma_{a_{x,l}}a_{x,l}} \\ {{\gamma_{\delta_{{rw},l}}\delta_{{rw},l}} + {\gamma_{a_{y}}\frac{\delta_{{rw},l}g^{2}u_{x,l}^{4}}{\left( {{Ku}_{x,l}^{2} + {Lg}} \right)^{2}}}} \\ {\gamma_{j_{z,l}}h_{x,l}} \\ {\gamma_{{\overset{.}{\delta}}_{r,w,l}}{\overset{.}{\delta}}_{{rw},l}} \end{bmatrix}\mspace{14mu} l} = {{1\mspace{14mu} \ldots \mspace{14mu} L} - 1}}}\mspace{76mu} {where}} & \left( {{Equation}\mspace{14mu} 46} \right) \\ {{{\overset{.}{U}}_{x}\left( z_{l} \right)} = {{\gamma_{a_{v}}\frac{2L\; \delta_{{rw},l}^{2}g^{3}u_{x,l}^{3}}{\left( {{Ku}_{x,l}^{2} + {Lg}} \right)^{3}}} + \left\{ \begin{matrix} {\gamma_{u_{-}}\mspace{149mu}} & {u_{x,l} < u_{x,l,{limit}}} \\ {\gamma_{u_{+}}\left( {u_{x,l} - u_{x,l,{limit}}} \right)} & {u_{x,l} \geq u_{x,l,{limit}}} \end{matrix} \right.}} & \left( {{Equation}\mspace{14mu} 47} \right) \end{matrix}$

and the term for the last timestamp is:

$\begin{matrix} {J_{L} = \begin{bmatrix} {\gamma_{w,p}\left( {x_{c,L} - x_{c,w}} \right)} \\ {\gamma_{w,p}\left( {y_{c,L} - y_{c,w}} \right)} \\ {\gamma_{w,h}{atan}\; 2\left( {{\sin \left( {\psi_{L} - \psi_{w}} \right)},{\cos \left( {\psi_{L} - \psi_{w}} \right)}} \right)} \\ {{\overset{.}{U}}_{x}\left( z_{L} \right)} \\ {\gamma_{a_{x,L}}a_{x,L}} \\ {{\gamma_{\delta_{{rw},L}}\delta_{{rw},L}} + {\gamma_{a_{y}}\frac{\delta_{{rw},l}g^{2}u_{x,l}^{4}}{\left( {{Ku}_{x,l}^{2} + {Lg}} \right)^{2}}}} \\ {\gamma_{j_{x,L}}j_{x,L}} \\ {\gamma_{{\overset{.}{\delta}}_{{rw},L}}{\overset{.}{\delta}}_{{rw},L}} \end{bmatrix}} & \left( {{Equation}\mspace{14mu} 48} \right) \end{matrix}$

It should be appreciated that the expression for heading error can be replaced with a min, max, and/or modulo version of angle distance when building these vectors/matrices.

Dynamic Equality Jacobians

Convex approximations of generic nonlinear optimization problem require the Jacobian of the functions describing constraints to be computed and defined. This section derives the jacobian of the example dynamic equality constraints described in an earlier section.

The following definitions may be useful:

$\begin{matrix} {{\overset{\sim}{u}}_{x,l} = {{\frac{1}{2}a_{x_{l}}\Delta \; t_{l}} + {\frac{1}{8}j_{x,l}\Delta \; t_{l}^{2}} + u_{x,l}}} & \left( {{Equation}\mspace{14mu} 49} \right) \\ {{\overset{\sim}{\delta}}_{{rw},l} = {\delta_{{rw},l} + {\frac{1}{2}\Delta \; t_{l}{\overset{.}{\delta}}_{{rw},l}}}} & \left( {{Equation}\mspace{14mu} 50} \right) \\ {{\overset{\sim}{u}}_{y,l} = {\frac{b\; {\overset{\sim}{\delta}}_{{rw},l}}{\frac{K}{g} + \frac{L}{{\overset{\sim}{u}}_{x,l}}} - \frac{{\overset{\sim}{\delta}}_{{rw},l}{\overset{\sim}{u}}_{x,l}W_{r}}{C_{ar}{g\left( {\frac{K}{g} + \frac{L}{{\overset{\sim}{u}}_{x,l}^{2}}} \right)}}}} & \left( {{Equation}\mspace{14mu} 51} \right) \\ {\left( \overset{\sim}{\psi} \right)_{l} = {\psi_{l} + \frac{\Delta \; t_{l}{\overset{\sim}{\delta}}_{{rw},l}}{2\left( {\frac{K}{g} + \frac{L}{{\overset{\sim}{u}}_{x,l}}} \right)}}} & \left( {{Equation}\mspace{14mu} 52} \right) \end{matrix}$

The nonlinear dynamical constraint equations become linearized in the convex subproblem:

$\begin{matrix} {\mspace{76mu} {{{\psi \left( t_{l} \right)} + {{J_{\psi}\left( z_{l} \right)}^{T}z_{l}} - {\psi \left( t_{l + 1} \right)}} = 0}} & \left( {{Equation}\mspace{14mu} 53} \right) \\ {\mspace{76mu} {{{x\left( t_{l} \right)} + {{J_{x}\left( z_{l} \right)}^{T}z_{l}} - {x\left( t_{l + 1} \right)}} = 0}} & \left( {{Equation}\mspace{14mu} 54} \right) \\ {\mspace{76mu} {{{{y\left( t_{l} \right)} + {{J_{y}\left( z_{l} \right)}^{T}z_{l}} - {y\left( t_{l + 1} \right)}} = 0}\mspace{76mu} {where}}} & \left( {{Equation}\mspace{14mu} 55} \right) \\ {\mspace{76mu} {{J_{\psi}\left( z_{l} \right)} = \begin{bmatrix} 0 \\ 0 \\ 0 \\ {8d_{\psi}} \\ {4\Delta \; t_{l}d_{\psi}} \\ \frac{1}{\frac{K}{g} + \frac{L}{{\overset{\sim}{u}}_{x,l}}} \\ {\Delta \; t_{l}^{2}d_{\psi}} \\ \frac{8\Delta \; t_{l}g{\overset{\sim}{u}}_{x,l}}{2\left( {{8K{\overset{\sim}{u}}_{l}} + {8{Lg}}} \right)} \end{bmatrix}}} & \left( {{Equation}\mspace{14mu} 56} \right) \\ {\mspace{76mu} {d_{\psi} = \frac{{Lg}^{2}{\overset{\sim}{\delta}}_{{rw},l}}{\left( {{K{\overset{\sim}{u}}_{x,l}} + {Lg}} \right)^{2}}}} & \left( {{Equation}\mspace{14mu} 57} \right) \\ {\mspace{76mu} {{J_{x}\left( z_{l} \right)} = \begin{bmatrix} 0 \\ 0 \\ {\Delta \; {t_{l}\left( {{{- {\overset{\sim}{u}}_{x,l}}\mspace{14mu} {\cos \left( {\overset{\sim}{\psi}}_{l} \right)}} + {{\overset{\sim}{u}}_{y,l}\mspace{14mu} {\sin \left( \overset{\sim}{\psi} \right)}}} \right)}} \\ d_{x} \\ {\frac{\Delta \; t_{l}}{2}d_{x}} \\ {{- \Delta}\; t_{l}\frac{{\overset{\sim}{u}}_{y,l}^{2}}{{\overset{\sim}{\delta}}_{{rw},l}}{\cos \left( {\overset{\sim}{\psi}}_{l} \right)}} \\ {\frac{\Delta \; t_{l}^{2}}{8}d_{x}} \\ {{- \Delta}\; t_{l}^{2}\frac{{\overset{\sim}{u}}_{y,l}^{8}}{2{\overset{\sim}{\delta}}_{{rw},l}}{\cos \left( {\overset{\sim}{\psi}}_{l} \right)}} \end{bmatrix}}} & \left( {{Equation}\mspace{14mu} 58} \right) \\ {\mspace{76mu} {d_{x} = {{{- \Delta}\; t_{l}d_{u}\mspace{14mu} {\cos \left( {\overset{\sim}{\psi}}_{l} \right)}} - {\Delta \; t_{l}\mspace{14mu} {\sin \left( {\overset{\sim}{\psi}}_{l} \right)}}}}} & \left( {{Equation}\mspace{14mu} 59} \right) \\ {d_{u} = {{\overset{\sim}{\delta}}_{{rw},l}{\quad\left( {\frac{Lb}{{{\overset{\sim}{u}}_{x,l}^{2}\left( {\frac{K}{g} + \frac{L}{{\overset{\sim}{u}}_{z,l}}} \right)}^{2}} - {\frac{W_{r}}{C_{ar}g}\left( {\frac{2L}{{{\overset{\sim}{u}}_{x,l}^{2}\left( {\frac{K}{g} + \frac{L}{{\overset{\sim}{u}}_{x,l}^{2}}} \right)}^{2}} + \frac{1}{\frac{k}{g} + \frac{L}{{\overset{\sim}{u}}_{x,l}^{2}}}} \right)}} \right)}}} & \left( {{Equation}\mspace{14mu} 60} \right) \\ {\mspace{76mu} {{J_{y}\left( z_{l} \right)} = \begin{bmatrix} 0 \\ 0 \\ {\Delta \; {t_{l}\left( {{{- {\overset{\sim}{u}}_{x,l}}\mspace{14mu} {\cos \left( {\overset{\sim}{\psi}}_{l} \right)}} - {{\overset{\sim}{u}}_{y,l}\mspace{14mu} {\cos \left( \overset{\sim}{\psi} \right)}}} \right)}} \\ d_{y} \\ {\frac{\Delta \; t_{l}}{2}d_{y}} \\ {{- \Delta}\; t_{l}\frac{{\overset{\sim}{u}}_{y,l}^{2}}{{\overset{\sim}{\delta}}_{{rw},l}}{\sin \left( {\overset{\sim}{\psi}}_{l} \right)}} \\ {\frac{\Delta \; t_{l}^{2}}{8}d_{y}} \\ {{- \Delta}\; t_{l}^{2}\frac{{\overset{\sim}{u}}_{y,l}^{8}}{2{\overset{\sim}{\delta}}_{{rw},l}}{\sin \left( {\overset{\sim}{\psi}}_{l} \right)}} \end{bmatrix}}} & \left( {{Equation}\mspace{14mu} 61} \right) \\ {\mspace{76mu} {d_{y} = {{{- \Delta}\; t_{l}d_{u}\mspace{14mu} {\sin \left( {\overset{\sim}{\psi}}_{l} \right)}} + {\Delta \; t_{l}\mspace{14mu} {\cos \left( {\overset{\sim}{\psi}}_{l} \right)}}}}} & \left( {{Equation}\mspace{14mu} 62} \right) \end{matrix}$

The values above can be calculated by using the chain rule (e.g., ignoring the product rule due to inapplicability), for example:

$\begin{matrix} {\frac{\partial{F\left( {\overset{\sim}{u},\overset{\sim}{\delta}} \right)}}{\partial j} = {\frac{\partial{F\left( {\overset{\sim}{u},\overset{\sim}{\delta}} \right)}}{\partial\overset{\sim}{u}}\frac{\partial\overset{\sim}{u}}{\partial j}}} & \left( {{Equation}\mspace{14mu} 63} \right) \\ {\frac{\partial^{2}{F\left( {\overset{\sim}{u},\overset{\sim}{\delta}} \right)}}{{\partial j}{\partial\delta}} = {\frac{\partial^{2}F}{{\partial\overset{\sim}{u}}{\partial\overset{\sim}{\delta}}}\frac{\partial\overset{\sim}{u}}{\partial j}\frac{\partial\overset{\sim}{\delta}}{\partial\delta}}} & \left( {{Equation}\mspace{14mu} 64} \right) \end{matrix}$

It may be possible to compute higher order numerical approximations tractably using the chain rule.

Objective Hessian

Convex approximations of generic nonlinear optimization problem require the Hessians of the objective function to be computed and defined. This section derives the Hessian of the example objective function described in an earlier section.

The hessian of the objective function can be block diagonal for each timestep, and may have the following form:

$\begin{matrix} {{{H_{l}\left( z_{l} \right)} = {{\begin{bmatrix} 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & {{\overset{\sim}{U}}_{x}\left( z_{l} \right)} & 0 & {h_{u_{x},\delta_{rw}}\left( z_{l} \right)} & 0 & 0 \\ 0 & 0 & 0 & 0 & \gamma_{a_{x,l}} & 0 & 0 & 0 \\ 0 & 0 & 0 & {h_{u_{x},\delta_{rw}}\left( z_{l} \right)} & 0 & {\gamma_{\delta_{{rw},l}} + {\gamma_{a_{y}}\frac{g^{2}u_{x,l}^{2}}{\left( {{Ku}_{x,l}^{2} + {Lg}} \right)^{2}}}} & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & \gamma_{j_{x,l}} & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & \gamma_{\delta_{{rw},l}} \end{bmatrix}\; l} = {{1\mspace{14mu} \ldots \mspace{14mu} L} - 1}}}{where}} & \left( {{Equation}\mspace{14mu} 65} \right) \\ {{{\overset{\sim}{U}}_{x}\left( z_{l} \right)} = {\frac{6\gamma_{a_{y}}\delta_{{rw},l}^{2}g^{3}{u_{x,l}^{2}\left( {{- {Ku}_{x,l}^{2}} + {Lg}} \right)}}{\left( {{Ku}_{x,l}^{2} + {Lg}} \right)^{4}} + \left\{ \begin{matrix} {0\mspace{25mu}} & {u_{x,l} < u_{x,l,{limit}}} \\ \gamma_{u_{+}} & {u_{x,l} \geq u_{x,l,{limit}}} \end{matrix} \right.}} & \left( {{Equation}\mspace{14mu} 66} \right) \end{matrix}$

the first term of which is related to lateral acceleration, and the second term is related to longitudinal velocity penalties. In some embodiments, the other terms for lateral acceleration include:

$\begin{matrix} {{h_{u_{x},\delta_{rw}}\left( z_{l} \right)} = \frac{\gamma_{a_{y}}4L\; \delta_{{rw},l}g^{3}u_{x,l}^{3}}{\left( {{Ku}_{x,l}^{2} + {Lg}} \right)^{3}}} & \left( {{Equation}\mspace{14mu} 67} \right) \end{matrix}$

As described herein, variable ordering can be assumed to be: [x_(c), y_(c), ψ, u_(x), a_(x), δ_(rw), j_(x), {dot over (δ)}_(rw)]^(T).

The last block corresponding to timestep L can have a slightly different form due to the final waypoint constraints:

$\begin{matrix} {{H_{L}\left( z_{l} \right)} = \begin{bmatrix} \gamma_{w,p} & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & \gamma_{w,p} & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & \gamma_{w,h} & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & {{\overset{\sim}{U}}_{x}\left( z_{L} \right)} & 0 & {h_{u_{x},\delta_{rw}}\left( z_{l} \right)} & 0 & 0 \\ 0 & 0 & 0 & 0 & \gamma_{a_{x,L}} & 0 & 0 & 0 \\ 0 & 0 & 0 & {h_{u_{x},\delta_{rw}}\left( z_{l} \right)} & 0 & {\gamma_{\delta_{{rw},L}} + {\gamma_{a_{y}}\frac{g^{2}u_{x,l}^{2}}{\left( {{Ku}_{x,l}^{2} + {Lg}} \right)^{2}}}} & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & \gamma_{j_{x,L}} & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & \gamma_{\delta_{{rw},L}} \end{bmatrix}} & \left( {{Equation}\mspace{14mu} 68} \right) \end{matrix}$

Most other constraints may be linear and can be passed on directly to the quadratic program (QP). In some embodiments, the nonlinear collision constraint can be linearized, and may not have curvature.

In some embodiments, because the dynamic constraints are being pushed into the objective function, the hessian for these terms are also estimated. This can result in the following (symmetric) hessians:

$\begin{matrix} {{{H_{\psi,l}\left( z_{l} \right)} = {{\begin{bmatrix} 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & \frac{{- {KLg}^{2}}\delta_{{rw},l}}{D_{\psi}^{2}} & \frac{{- {KL}}\; \Delta \; t_{l}g^{2}\delta_{{rw},l}}{2D_{pm}^{2}} & \frac{{Lg}^{2}}{D_{\psi}^{2}} & \frac{{- {KL}}\; \Delta \; t_{l}^{2}g^{2}\delta_{{rw},l}}{4D_{\psi}^{2}} & \frac{L\; \Delta \; t_{l}g^{2}}{2D_{\psi}^{2}} \\ 0 & 0 & 0 & — & \frac{{- {KL}}\; \Delta \; t_{l}^{2}g^{2}\delta_{{rw},l}}{2D_{\psi}^{2}} & \frac{L\; \Delta \; t_{l}g^{2}}{2D_{\psi}^{2}} & \frac{{- {KL}}\; \Delta \; t_{l}^{2}g^{2}\delta_{{rw},l}}{8D_{\psi}^{2}} & \frac{L\; \Delta \; t_{l}^{2}g^{2}}{4D_{\doteq}^{2}} \\ 0 & 0 & 0 & — & — & 0 & \frac{L\; \Delta \; t_{l}^{2}g^{2}}{8D_{\psi}^{2}} & 0 \\ 0 & 0 & 0 & — & — & — & \frac{{- {KL\Delta}}\; t_{l}^{2}g^{2}\delta_{{rw},l}}{32D_{\psi}^{n}} & \frac{L\; \Delta \; t_{l}^{2}g^{2}}{16D_{pm}^{2}} \\ 0 & 0 & 0 & — & — & — & — & 0 \end{bmatrix}\mspace{14mu} l} = {{1\mspace{14mu} \ldots \mspace{14mu} L} - 1}}}{where}} & \left( {{Equation}\mspace{14mu} 69} \right) \\ {D_{\psi} = {{K{\overset{\sim}{u}}_{x,l}} + {Lg}}} & \left( {{Equation}\mspace{14mu} 70} \right) \\ {{{H_{z,l}\left( z_{l} \right)} = \begin{bmatrix} 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & h_{x,\psi} & h_{x,\psi,u} & {\frac{1}{2}\Delta \; t_{l}h_{x,\psi,u}} & h_{x,\psi,\delta} & {\frac{1}{8}\Delta \; t_{l}^{2}h_{x,\psi,u}} & {\frac{1}{2}\Delta \; t_{l}h_{x,\psi,\delta}} \\ 0 & 0 & — & D_{x} & {\frac{1}{2}\Delta \; t_{l}D_{x}} & {D_{\delta}\mspace{14mu} {\cos \left( {\overset{\sim}{\psi}}_{l} \right)}} & {\frac{1}{8}\Delta \; t_{l}^{2}D_{x}} & {\frac{1}{2}\Delta \; t_{l}D_{\delta}\mspace{14mu} {\cos \left( {\overset{\sim}{\psi}}_{l} \right)}} \\ 0 & 0 & — & — & {\frac{1}{4}\Delta \; t_{l}^{2}D_{x}} & {\frac{1}{2}\Delta \; t_{l}D_{\delta}\mspace{14mu} {\cos \left( {\overset{\sim}{\psi}}_{l} \right)}} & {\frac{1}{16}\Delta \; t_{l}^{3}D_{x}} & {\frac{1}{4}\Delta \; D_{\delta}\mspace{14mu} {\cos \left( {\overset{\sim}{\psi}}_{l} \right)}} \\ 0 & 0 & — & — & — & 0 & {\frac{1}{8}\Delta \; t_{l}^{2}D_{\delta}\mspace{14mu} {\cos \left( {\overset{\sim}{\psi}}_{l} \right)}} & 0 \\ 0 & 0 & — & — & — & — & {\frac{1}{64}\Delta \; t_{l}^{4}D_{x}} & {\frac{1}{16}\Delta \; t_{l}^{3}D_{\delta}\mspace{14mu} {\cos \left( {\overset{\sim}{\psi}}_{l} \right)}} \\ 0 & 0 & — & — & — & — & — & 0 \end{bmatrix}}{where}} & \left( {{Equation}\mspace{14mu} 71} \right) \\ {h_{x,\psi} = {{{- \Delta}\; t_{l}{\overset{\sim}{u}}_{y,l}\mspace{14mu} {\cos \left( {\overset{\sim}{\psi}}_{l} \right)}} + {\Delta \; t_{l}{\overset{\sim}{u}}_{x,l}\mspace{14mu} {\sin \left( {\overset{\sim}{\psi}}_{l} \right)}}}} & \left( {{Equation}\mspace{14mu} 72} \right) \\ {h_{x,\psi,u} = {{{- D_{\delta}}\mspace{14mu} {\sin \left( {\overset{\sim}{\psi}}_{l} \right)}} - {\Delta \; t_{l}\mspace{14mu} {\cos \left( {\overset{\sim}{\psi}}_{l} \right)}}}} & \left( {{Equation}\mspace{14mu} 73} \right) \\ {h_{x,\psi,\delta} = {\Delta \; t_{l}\frac{{\overset{\sim}{u}}_{y,l}}{\delta_{{rw},l}}{\sin \left( {\overset{\sim}{\psi}}_{l} \right)}}} & \left( {{Equation}\mspace{14mu} 74} \right) \\ {D_{u} = {{K{\overset{\sim}{u}}_{x,l}^{2}} + {Lg}}} & \left( {{Equation}\mspace{14mu} 75} \right) \\ {D_{u} = {2{Lg}\; {\overset{\sim}{\delta}}_{{rw},l}\Delta \; {t_{l}\left( {\frac{Kbg}{D_{\psi}^{3}} - \frac{K{\overset{\sim}{u}}_{x,l}^{2}W_{r}}{C_{ax}D_{a}^{3}} + \frac{3{Lg}{\overset{\sim}{u}}_{x,l}W_{r}}{C_{ar}D_{a}^{3}}} \right)}}} & \left( {{Equation}\mspace{14mu} 76} \right) \\ {D_{x} = {D_{u}\mspace{14mu} {\cos \left( {\overset{\sim}{\psi}}_{l} \right)}}} & \left( {{Equation}\mspace{14mu} 77} \right) \\ {D_{\delta} = {\Delta \; {t_{l}\left( {\frac{K{\overset{\sim}{u}}_{x,l}^{4}W_{r}}{C_{ar}D_{a}^{2}} - \frac{{Lbg}^{2}}{D_{\psi}^{2}} + \frac{3{Lg}\; {\overset{\sim}{u}}_{x,l}^{2}W_{r}}{C_{ar}D_{a}^{2}}} \right)}}} & \left( {{Equation}\mspace{14mu} 78} \right) \\ {{{H_{y,l}\left( z_{l} \right)} = \begin{bmatrix} 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & h_{y,\psi} & h_{y,\psi,u} & {\frac{1}{2}\Delta \; t_{l}h_{y,\psi,u}} & h_{y,\psi,u} & {\frac{1}{8}\Delta \; t_{l}^{2}h_{y,\psi,u}} & {\frac{1}{2}\Delta \; t_{l}h_{y,\psi,\delta}} \\ 0 & 0 & — & D_{y} & {\frac{1}{2}\Delta \; t_{l}D_{y}} & {D_{\delta}\mspace{14mu} {\sin \left( \psi_{l} \right)}} & {\frac{1}{8}\Delta \; t_{l}^{2}D_{y}} & {\frac{1}{8}\Delta \; t_{l}D_{\delta}\mspace{14mu} {\sin \left( {\overset{\sim}{\psi}}_{l} \right)}} \\ 0 & 0 & — & — & {\frac{1}{4}\Delta \; t_{l}^{2}D_{y}} & {\frac{1}{2}\Delta \; t_{l}D_{\delta}\mspace{14mu} {\sin \left( {\overset{\sim}{\psi}}_{l} \right)}} & {\frac{1}{16}\Delta \; t_{l}^{2}D_{y}} & {\frac{1}{4}\Delta \; t_{l}^{2}D_{\delta}\mspace{14mu} {\sin \left( {\overset{\sim}{\psi}}_{l} \right)}} \\ 0 & 0 & — & — & — & 0 & {\frac{1}{8}\Delta \; t_{l}^{2}D_{\delta}\mspace{14mu} {\sin \left( {\overset{\sim}{\psi}}_{l} \right)}} & 0 \\ 0 & 0 & — & — & — & — & {\frac{1}{64}\Delta \; t_{l}^{2}D_{\delta}\mspace{14mu} {\sin \left( {\overset{\sim}{\psi}}_{l} \right)}} & 0 \\ 0 & 0 & — & — & — & — & — & 0 \end{bmatrix}}{where}} & \left( {{Equation}\mspace{14mu} 79} \right) \\ {h_{y,\psi} = {{\Delta \; t_{l}{\overset{\sim}{u}}_{y,l}\mspace{14mu} {\sin \left( {\overset{\sim}{\psi}}_{l} \right)}} - {\Delta \; t_{l}{\overset{\sim}{u}}_{x,l}\mspace{14mu} {\cos \left( {\overset{\sim}{\psi}}_{l} \right)}}}} & \left( {{Equation}\mspace{14mu} 80} \right) \\ {h_{y,\psi,u} = {{D_{\psi}\mspace{14mu} {\cos \left( {\overset{\sim}{\psi}}_{l} \right)}} - {\Delta \; t_{l}\mspace{14mu} {\sin \left( {\overset{\sim}{\psi}}_{k} \right)}}}} & \left( {{Equation}\mspace{14mu} 81} \right) \\ {h_{y,\psi,\delta} = {{- \Delta}\; t_{l}\frac{{\overset{\sim}{u}}_{y,l}}{{\overset{\sim}{\delta}}_{{rw},l}}{\cos \left( {\overset{\sim}{\psi}}_{l} \right)}}} & \left( {{Equation}\mspace{14mu} 82} \right) \\ {D_{y} = {D_{u}\mspace{14mu} {\sin \left( {\overset{\sim}{\psi}}_{l} \right)}}} & \left( {{Equation}\mspace{14mu} 83} \right) \\ {H_{e,l} = {H_{\psi,l} + H_{x,l} + H_{y,l}}} & \left( {{Equation}\mspace{14mu} 84} \right) \end{matrix}$

Full SQP Subproblem

In some embodiments, the following is the full optimization problem solved at each timestep (e.g., step 330 of process 300).

For brevity, d=θ−θ₀. Further, the objective jacobian and objective hessian may be:

J=[J ₁ . . . J _(l) . . . J _(L)]  (Equation 85)

H=diag([H ₁ +H _(e,l) . . . H _(l) +H _(e,l) . . . H _(L)])  (Equation 86)

For clarity, the functions described above may be translated as:

⋅_(l)(θ₀)=[0 . . . 0⋅_(l)(z _(l))0 . . . 0]  (Equation 87)

where ⋅ is one of the jacobian expressions derived in the Trajectory Optimization Problem Formulation for Vehicle Motion Planning section, and θ=[z₁ . . . z_(L)].

$\begin{matrix} \begin{matrix} {\mspace{65mu} \min\limits_{d}} & {{J^{T}d} + {\frac{1}{2}d^{T}\mspace{14mu} {Hd}} +} & \; & \; \\ \; & {{\sum\limits_{l = 1}^{L}\; {\sum\limits_{k \in K_{l}}{\mu_{k,l}l_{k,l}}}} +} & \; & \; \\ \; & {\sum\limits_{l = 1}^{L - 1}\; {\mu_{e,l}\left( {v_{x,l} + w_{x,l} + v_{y,l} + w_{y,l} + v_{\psi,l} + w_{\psi,l}} \right)}} & \; & \; \\ {{subject}\mspace{14mu} {to}} & d_{i} & {{\leq s}\mspace{95mu}} & {\forall{i \in \left\lbrack {1,{8L}} \right\rbrack}} \\ \; & d_{i} & {{\geq {- s}}\mspace{76mu}} & {\forall{i \in \left\lbrack {1,{8L}} \right\rbrack}} \\ \; & {z_{1} - z_{init}} & {{= 0}} & \; \\ \; & {a_{x,l} + {j_{x,l}\Delta \; t_{l}} - a_{x,{l + 1}}} & {{= 0}} & {l = {{1\mspace{14mu} \ldots \mspace{14mu} L} - 1}} \\ \; & {u_{x,l} + {a_{x,l}\Delta \; t_{l}} + {\frac{1}{2}j_{x,l}\Delta \; t_{l}^{2}} - u_{x,{l + 1}}} & {{= 0}} & {l = {{1\mspace{14mu} \ldots \mspace{14mu} L} - 1}} \\ \; & {\delta_{{rw},l} + {{\overset{\sim}{\delta}}_{{rw},l}\Delta \; t_{l}} - \delta_{{rw},{l + 1}}} & {{= 0}} & {l = {{1\mspace{14mu} \ldots \mspace{14mu} L} - 1}} \\ \; & {{{J_{x,l}^{T}\left( \theta_{0} \right)}\left( {d + \theta_{0}} \right)} + x_{l} - x_{l + 1}} & {{= {v_{x,l} - w_{x,l}}}\;} & {l = {{1\mspace{14mu} \ldots \mspace{14mu} l} - 1}} \\ \; & {{{J_{y,l}^{T}\left( \theta_{0} \right)}\left( {d + \theta_{0}} \right)} + y_{l} - y_{l + 1}} & {= {v_{y,l} - w_{y,l}}} & {l = {{1\mspace{14mu} \ldots \mspace{14mu} l} - 1}} \\ \; & {{{J_{\psi,l}^{T}\left( \theta_{0} \right)}\left( {d + \theta_{0}} \right)} + \psi_{l} - \psi_{l + 1}} & {= {v_{\psi,l} - w_{\psi,l}}} & {l = {{1\mspace{14mu} \ldots \mspace{14mu} L} - 1}} \\ \; & {{{\hat{n}}_{k,l}^{T}{J_{p_{k,l}}\left( \theta_{0} \right)}d} + {{sd}\left( {{p_{k,l}\left( \theta_{0} \right)},q_{k,l}} \right)} - d_{{safe},k}} & {{\geq t_{k,l}}\mspace{76mu}} & {{\forall{k \in K_{l}}},{l \in \left\lbrack {1,L} \right\rbrack}} \\ \; & {v_{\cdot {,l}},w_{\cdot {,l}}} & {{\geq 0}} & {{\cdot {\in \left\{ {x,y,\psi} \right\}}},{l = {{1\mspace{14mu} \ldots \mspace{14mu} L} - 1}}} \\ \; & t_{k,l} & {{\geq 0}} & {{\forall{k \in K_{l}}},{l = {1\mspace{14mu} \ldots \mspace{14mu} L}}} \\ {\mspace{40mu} {u_{\min} \leq}} & u_{x,l} & {{\leq u_{\max}}\mspace{56mu}} & {l = {1\mspace{14mu} \ldots \mspace{14mu} L}} \\ {\mspace{40mu} {\delta_{\min} \leq}} & \delta_{{rw},l} & {{\leq \delta_{\max}}\mspace{59mu}} & {l = {1\mspace{14mu} \ldots \mspace{14mu} L}} \\ {\mspace{25mu} {a_{x,\min} \leq}} & a_{x,l} & {{\leq a_{x,\max}}\mspace{45mu}} & {l = {1\mspace{14mu} \ldots \mspace{14mu} L}} \\ {\mspace{40mu} {\delta_{\min} \leq}} & {\overset{\sim}{\delta}}_{{rw},l} & {{\leq {\overset{\sim}{\delta}}_{\max}}\mspace{59mu}} & {l = {1\mspace{14mu} \ldots \mspace{14mu} L}} \\ {\mspace{40mu} {j_{\min} \leq}} & j_{x,l} & {{\leq j_{\max}}\mspace{59mu}} & {l = {1\mspace{14mu} \ldots \mspace{14mu} L}} \\ {\mspace{25mu} {a_{y,\min} \leq}} & a_{u,l} & {{\leq a_{u,\max}}\mspace{45mu}} & {l = {1\mspace{14mu} \ldots \mspace{14mu} L}} \end{matrix} & \left( {{Equation}\mspace{14mu} 88} \right) \end{matrix}$

where μ's are the L1 penalty weights that are incrementally increased in the outermost loop of the SQP solver. Specifically, μ_(k,l) may be a different weight for different objects (e.g., polylines may be penalized less than vehicles, which may be penalized less than pedestrians), and μ_(e,l) are the weights for the equality constraints, which, for example, may be greater for a smaller l.

The constraints can be summarized (in order) as follows:

-   -   Trust region (box) constraint)     -   Initial conditions     -   Linear dynamic equality constraints (inherently linear updates)     -   Linearized collision constraints     -   Linearized collision constraints     -   Nonnegativity of slack variables     -   Constraints on ranges of state variables

In various embodiments, this results in a QP with 8L+6(L−1)+2L+K parameters and 6(L−1) equality constraints and 16L+K+12L inequality constraints, where L is the number of time steps in the horizon, and K is the number of objects present at the current solve. Simplified, the tuple of (# param, # equality constraints, # inequality constraints) becomes: (16L+K−6, 6L−6, 28L+K).

FIG. 5 illustrates an exemplary system block diagram of an autonomous vehicle system including automated driving software according to examples of the disclosure. Vehicle control system 500 can perform automated driving and driving assistance.

System 500 can be incorporated into a vehicle, such as a consumer automobile. Other example vehicles that may incorporate the system 500 include, without limitation, airplanes, boats, motorcycles, robots, or industrial automobiles. Vehicle control system 500 can include one or more cameras 506 capable of capturing image data (e.g., video data) for determining various characteristics of the vehicle's surroundings. Vehicle control system 500 can also include one or more other sensors 507 (e.g., radar, ultrasonic, LIDAR, etc.) capable of detecting various characteristics of the vehicle's surroundings (e.g., to use as scenario parameters of a scenario). For example, sensors 507 can be used for detecting the presence of an object and a distance between the object and the vehicle. Global Positioning System (GPS) receiver 508 capable of determining the location of the vehicle. In some examples, traffic information 505 can be received (e.g., by an antenna) or accessed (e.g., from storage 512 or memory 516), and can be used for determining automated driving routes.

Vehicle control system 500 can include an on-board computer 610 coupled to the traffic information 505, cameras 506, sensors 507, and GPS receiver 508. On-board computer 610 can be capable of receiving one or more of the traffic information, image data from the cameras, outputs from the sensors 507 and the GPS receiver 508. On-board computer 510 can include storage 512, memory 516, and a processor (central processing unit (CPU)) 514. CPU 514 can execute automated driving software stored in storage 512 and/or memory 514. For example, CPU 514 can process the traffic information, image data, sensor outputs and GPS outputs and make driving decisions thereon. For example, processing can include detecting and tracking objects in the environment, tracking vehicle parameters (e.g., odometer, location), navigation planning, lane selection/change planning, motion planning, determining automated driving commands, etc. Additionally, storage 512 and/or memory 516 can store data and instructions for performing the above processing. Storage 512 and/or memory 516 can be any non-transitory computer readable storage medium, such as a solid-state drive, a hard disk drive or a random access memory (RAM) among other possibilities.

The vehicle control system 500 can also include a controller 520 capable of controlling one or more aspects of vehicle operation based on automated driving commands received from the processor. In some examples, the vehicle control system 500 can be connected to (e.g., via controller 520) one or more actuator systems 530 in the vehicle and one or more indicator systems 540 in the vehicle. The one or more actuator systems 530 can include, but are not limited to, a motor 531 or engine 532, battery system 533, transmission gearing 534, suspension setup 535, brakes 536, steering system 537, and door system 538. The vehicle control system 500 can control, via controller 520, one or more of these actuator systems 630 during vehicle operation; for example, to open or close one or more of the doors of the vehicle using the door actuator system 538, to control the vehicle during autonomous driving or parking operations using the motor 531 or engine 532, battery system 533, transmission gearing 534, suspension setup 535, brakes 536 and/or steering system 537, etc. The one or more indicator systems 540 can include, but are not limited to, one or more lights 542 in the vehicle, one or more tactile actuators 544 in the vehicle (e.g., as part of a steering wheel or seat in the vehicle), and/or one or more infotainment systems 545 (e.g., providing entertainment and/or information to the user). The vehicle control system 500 can control, via controller 520, one or more of these indicator systems 640 to provide indications to a user of the vehicle.

In addition, vehicle control system 500 can include a decision maker 550, and a motion planner 560. As described herein, the decision maker 550 and the motion planner 560 may work in conjunction to create a motion plan (e.g., a trajectory and/or velocity). In some embodiments, processes described herein, including processes 300, may be performed by motion planner 560. Also, in some embodiments, decision maker 550 and motion planner 560 may be included in onboard computer 510.

Although examples of this disclosure have been fully described with reference to the accompanying drawings, it is to be noted that various changes and modifications will become apparent to those skilled in the art. Such changes and modifications are to be understood as being included within the scope of examples of this disclosure as defined by the appended claims. 

1. A system comprising: one or more processors; and a memory including instructions, which when executed by the one or more processors, cause the one or more processors to perform a method comprising: receiving a vehicle pose, a target goal, and an obstacle; deriving constraints from the pose, the target goal, and the obstacle; convexifying a problem based at least in part on the constraints; generating a trajectory based at least in part on the convexification of the problem; causing a vehicle to travel based at least in part on the trajectory.
 2. The system of claim 1, wherein the method further comprises: retrieving an initial guess based on a concatenated vector of the vehicle pose.
 3. The system of claim 2, wherein convexifying a problem comprises: turning nonlinear constraints into penalties in an objective function; and introducing slack variables for the nonlinear constraints.
 4. The system of claim 3, wherein the method further comprises: determining whether a true objective function improves enough with regard to a result of the convexifying the problem; if the true objective function improves enough, updating true region variables accordingly; and if the true objective function does not improve enough, reducing a true region.
 5. The system of claim 4, wherein the method further comprises increasing the penalties.
 6. The system of claim 1, wherein the method further comprises generating a numerical representation of a goodness of the trajectory.
 7. The system of claim 6, wherein the representation comprises an objective function.
 8. The system of claim 7, wherein the objective function comprises terms relating to comfort and satisfaction of the target goal. 